import request from '@/utils/request'
// 质控计划明细查询
export function query(data) {
  return request({
    url: `/md/monopy/qualityPlans/query`,
    method: 'post',
    data
  })
}
// 批量删除
export function batchRemove(data) {
  return request({
    url: `/md/monopy/qualityPlans/deleteList`,
    method: 'delete',
    data
  })
}
// 获取默认计划编号
export function getDefaultPlan() {
  return request({
    url: `/md/monopy/qualityPlans/getDefaultPlan`,
    method: 'get'
  })
}
// 保存或新增
export function save(data) {
  return request({
    url: `/md/monopy/qualityPlans/save`,
    method: 'post',
    data
  })
}
// 导出文件
export function exportByItem(item) {
  return request({
    url: `md/monopy/qualityPlans/exportByItem?item=${item}`,
    responseType: 'blob',
    method: 'get'
  })
}
// 导入文件
export function importExcel(data) {
  return request({
    url: `md/monopy/qualityPlans/importExcel`,
    headers: { 'Content-Type': 'multipart/form-data' },
    method: 'post',
    data
  })
}
